//logs.js
const app = getApp()
const util = require('../../utils/util.js');
const md5 = require('../../utils/md5.js');
const com = require('../../utils/common.js');
var arr = {};
arr.name = '肖雨';
arr.age = '29';
arr.classes = '高三';
arr.url = 'sdfsdafsfda';
for(let i in arr)
{
  arr[i] = encodeURI(arr[i]);
}
var json = JSON.stringify(arr);
Page({
  data: {
    logs: ['2019-01-21'],
    items: [
      { name: 'USA', value: '美国' },
      { name: 'CHN', value: '中国', checked: 'true' },
      { name: 'BRA', value: '巴西' },
      { name: 'JPN', value: '日本' },
      { name: 'ENG', value: '英国' },
      { name: 'TUR', value: '法国' },
    ],
    str2:''
  },
  onLoad:function()
  {
    var that = this;
    var arr = {};
    arr.name="肖雨";
    arr.school='江南';
    // this.getList();
    arr = JSON.stringify(arr);
    //wx.setStorage({ key: 'key', data: arr});
    wx.getStorageInfo({
      success(res) {
        console.log(res.keys)
        console.log(res.currentSize)
        console.log(res.limitSize)
      }
    })
    console.log(wx.getLaunchOptionsSync());
  },
  checkboxChange(e) {
    console.log(e);
    console.log('checkbox发生change事件，携带value值为：', e.detail.value);
  },
  /*获取列表*/
  getList()
  {
    let that=this;
    wx.request({
      url: app.httpurl+'xcx/getindex.php?act=infoclass',
      header: {
        'content-type': 'application/x-www-form-urlencoded' // 默认值
      },
      method:'POST',
      success(res) {
        console.log(res.data)
      }
    })
  },
  // 小程序客服
  handleContact(e)
  {
    console.log(e.detail.path)
    console.log(e.detail.query)
  }
})
